#define paginate(currentPage, totalPage, link)
#if(totalPage < 2 || currentPage > totalPage)
	#return
#end
#setLocal(startPage = currentPage - 3)
#if(startPage < 1)
	#setLocal(startPage = 1)
#end
#setLocal(endPage = currentPage + 3)
#if(endPage > totalPage)
	#setLocal(endPage = totalPage)
#end
<div class="jf-pagebox">
	<nav aria-label="Page navigation">
		<ul class="pagination">

#if(currentPage > 1)
	<li class="page-item">
		<a class="page-link" href="#(link)#(currentPage - 1)#(append)" aria-label="Previous">
			<span aria-hidden="true">&laquo;</span>
		</a>
	</li>
#end
#if(currentPage - 3 > 1)
	<li class="page-item">
		<a class="page-link" href="#(link)1#(append)">1</a>
	</li>
#end
#for(i : [startPage..endPage])
#if(currentPage == i)
	<li class="page-item active">
		<a class="page-link" href="javascript:void(0);">#(i)</a>
	</li>
#else
	<li class="page-item">
		<a class="page-link" href="#(link)#(i)#(append)">#(i)</a>
	</li>
#end
#end
#if(currentPage + 3 < totalPage)
	<li class="page-item">
		<a class="page-link" href="#(link)#(totalPage)#(append)">#(totalPage)</a>
	</li>
#end
#if(currentPage < totalPage)
	<li class="page-item">
		<a class="page-link" href="#(link)#(currentPage + 1)#(append)" aria-label="Next">
			<span aria-hidden="true">&raquo;</span>
		</a>
	</li>
#end

		</ul>
	</nav>
</div>
#end